package cn.edkuir.product.vo;

import cn.edkuir.product.entity.SkuImagesEntity;
import cn.edkuir.product.entity.SkuInfoEntity;
import cn.edkuir.product.entity.SpuInfoDescEntity;
import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
@ToString
public class SkuItemVo {

    private SkuInfoEntity skuInfoEntity;    //sku基本信息

    private boolean hasStock = true;   //是否有货

    private List<SkuImagesEntity> skuImagesEntities;    //sku图片信息

    private SpuInfoDescEntity spuInfoDescEntity;    //spu描述信息

    private List<SkuItemSaleAttrVo> saleAttr;   //所有销售属性信息

    private List<SpuItemAttrGroupVo> groupAttrs;    //spu规格参数(基本属性)

    private SeckillInfoVo seckillInfo;  //当前商品秒杀信息


    @Data
    @ToString
    public static class SkuItemSaleAttrVo {
        private Long attrId;
        private String attrName;
        private String attrValues;
    }

    @Data
    @ToString
    public static class SpuItemAttrGroupVo {
        private String groupName;   //分组名字
        private List<SpuBaseAttrVo> attrs;  //每个分组对应的所有基本属性
    }

    @Data
    @ToString
    public static class SpuBaseAttrVo {
        private String attrName;
        private String attrValue;
    }

}
